#!/bin/bash



rev=`svn info|awk '/^Revision/{print $2;exit;}'`

kiwiphp_dir=kiwiphp-0.1.$rev

echo "mkdir $kiwiphp_dir"
mkdir $kiwiphp_dir
echo "cp -r ../runtime $kiwiphp_dir"
cp -r ../runtime $kiwiphp_dir

if [ x$kiwiphp_dir != x ]
then
	echo "find $kiwiphp_dir -name '.svn' |xargs rm -rf"
	find $kiwiphp_dir -name '.svn' |xargs rm -rf 
fi

echo "tar -czf ${kiwiphp_dir}.tgz ${kiwiphp_dir}"
tar -czf ${kiwiphp_dir}.tgz ${kiwiphp_dir}

echo "rm -rf $kiwiphp_dir"
rm -rf $kiwiphp_dir
